package cn.magictodo.weblog.web;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

import javax.annotation.PostConstruct;
import java.util.TimeZone;

@SpringBootApplication
@ComponentScan({"cn.magictodo.weblog.*"}) // 多模块项目中，必需手动指定扫描包下面的所有类@ComponentScan在指定的包路径下自动扫描并注册Bean。
@EnableScheduling // 启用定时任务
public class WeblogWebApplication {
    @PostConstruct
    void started() {
        TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
    }

    public static void main(String[] args) {
        SpringApplication.run(WeblogWebApplication.class, args);
    }

}
